using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
using bitzhuwei.Compiler;

namespace bitzhuwei.AnsiCFormat {
    /// <summary>
    /// Correspond to the Vn node assignment_operator in the grammar(AnsiC).
    /// </summary>
    internal partial class Vnassignment_operator : IFullFormatter {
        // [060]=assignment_operator : '=' ;
        // [061]=assignment_operator : '*=' ;
        // [062]=assignment_operator : '/=' ;
        // [063]=assignment_operator : '%=' ;
        // [064]=assignment_operator : '+=' ;
        // [065]=assignment_operator : '-=' ;
        // [066]=assignment_operator : '<<=' ;
        // [067]=assignment_operator : '>>=' ;
        // [068]=assignment_operator : '&=' ;
        // [069]=assignment_operator : '^=' ;
        // [070]=assignment_operator : '|=' ;
        private readonly TokenRange _scope;
        public TokenRange Scope => _scope;

        public void Format(TextWriter writer, FormatContext context) {
            throw new NotImplementedException();
        }

        public void FullFormat(BlankConfig preConfig, TextWriter writer, FormatContext context) {
            context.PrintBlanksAnd(this.token, preConfig, writer);
        }

        public IEnumerable<string> YieldTokens(TextWriter writer, FormatContext context) {
            throw new NotImplementedException();
        }


        internal readonly Token token;

        internal Vnassignment_operator(Token token) {
            this.token = token;
            this._scope = new TokenRange(token);
        }

    }
}
